//
//  DetailViewController.m
//  通讯录罚写10
//
//  Created by dllo on 15/11/21.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "DetailViewController.h"
#import "Children.h"

@interface DetailViewController ()

@end

@implementation DetailViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    
    self.navigationItem.title = self.child.name;
    
    UIImageView *imageV = [[UIImageView alloc] initWithFrame:CGRectMake(20, 50, 80, 150)];
    imageV.image = [UIImage imageNamed:self.child.image];
    [self.view addSubview:imageV];
    [imageV release];
    
    
    UITextField *textF1 = [[UITextField alloc] initWithFrame:CGRectMake(120, 50, 80, 30)];
    textF1.text = self.child.name;
    textF1.borderStyle = UITextBorderStyleBezel;
    [self.view addSubview:textF1];
    [textF1 release];
    
    UITextField *textF2 = [[UITextField alloc] initWithFrame:CGRectMake(120, 100, 50, 30)];
    textF2.text = self.child.sex;
    textF2.borderStyle = UITextBorderStyleBezel;
    [self.view addSubview:textF2];
    [textF2 release];
    
    UITextField *textF3 = [[UITextField alloc] initWithFrame:CGRectMake(230, 100, 50, 30)];
    textF3.text = self.child.age;
    textF3.borderStyle = UITextBorderStyleBezel;
    [self.view addSubview:textF3];
    [textF3 release];
    
    UITextField *textF4 = [[UITextField alloc] initWithFrame:CGRectMake(120, 170, 150, 30)];
    textF4.text = self.child.phone;
    textF4.borderStyle = UITextBorderStyleBezel;
    [self.view addSubview:textF4];
    [textF4 release];
    
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
